package com.hmily.dubbo.provider.impl;

import com.hmily.dubbo.api.DelayFacade;
import org.apache.dubbo.rpc.RpcContext;

/**
 * <h1>延迟接口实现类逻辑。</h1>
 *
 * @author hmilyylimh
 *         ^_^
 * @version 0.0.1
 *         ^_^
 * @date 2021-11-07
 *
 */
public class DelayFacadeImpl implements DelayFacade {

    @Override
    public String delay(String name) {
        RpcContext context = RpcContext.getContext();
        String msg = "hello " + name + ", my name is yuki, delay delay delay delay, port = " + context.getLocalPort() + "["+System.currentTimeMillis()+"]";
        System.out.println(msg);
        return msg;
    }
}
